package com.joysuch.wwyt.common.enums;

/**
 * @Author ZhangDong
 * @Date 2020/5/25 15:05
 */
public enum WorkFlowTypes {

    HIDE_DANGER(1, "隐患"),
    WORK_CERT(2, "作业");
    private Integer index;
    private String type;

    WorkFlowTypes(Integer index, String type) {
        this.index = index;
        this.type = type;
    }

    public String getType(Integer index){
        WorkFlowTypes[] values = WorkFlowTypes.values();
        for (WorkFlowTypes value : values) {
            if(index.equals(value.index)){
                return value.type;
            }
        }
        return null;
    }
}
